﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using VideoNetApplication.Common.Dao;

namespace VideoNetApplication.Common.Service
{
    public class CourseService
    {

        CourseDao dao=new CourseDao();
      /// <summary>
      /// 获取学校的课程
      /// </summary>
      /// <param name="schoolId"></param>
      /// <returns></returns>
      public List<V_course> GetAllCoursebySchoolid(int schoolId)
      {
          return dao.GetAllCoursebySchoolid(schoolId);
      }

        public  List<V_course> GetCourse(int schoolId,int startIndex,int maxRows,out int recordCount)
        {
            return dao.GetCourse(schoolId, startIndex, maxRows, out recordCount);
        }


        /// <summary>
        /// 获取学员课程
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="schoolId"></param>
        /// <param name="strWhere"></param>
        /// <param name="orderByField"></param>
        /// <returns></returns>
      public DataSet GetUserCourseList(int userId, int schoolId, string strWhere, string orderByField)
      {
          return dao.GetUserCourseList(userId, schoolId, strWhere, orderByField);
      }
        public  int ChkExsit(int vsid)
        {
            return dao.ChkExsit(vsid);
        }


        public DataSet GetCourseDetailByDestId(int schoolId, int courseListId)
        {
            return dao.GetCourseDetailByDestId(schoolId, courseListId);
        }


        public V_course GetCourseById(int schoolId, int courseListId)
        {
            return dao.GetCourseById(schoolId, courseListId);
        }
    }
}
